using System;

namespace Headspring.Training.Core.Model
{
	public class HistoryEntry
	{
		private HistoryEntry()
		{
		}

		public HistoryEntry(Employee employee,
		                    WorkOrderStatus beginStatus, WorkOrderStatus endStatus,
		                    DateTime changeDate)
		{
			Employee = employee;
			BeginStatus = beginStatus;
			EndStatus = endStatus;
			ChangeDate = changeDate;
			EmployeeFirstName = employee.FirstName;
			EmployeeLastName = employee.LastName;
		}

		public Guid ID { get; set; }
		public string EmployeeFirstName { get; set; }
		public string EmployeeLastName { get; set; }
		public WorkOrderStatus BeginStatus { get; set; }
		public WorkOrderStatus EndStatus { get; set; }
		public DateTime ChangeDate { get; set; }
		public Employee Employee { get; set; }

		public string GetFullName()
		{
			return string.Format("{0}, {1}", EmployeeLastName,
			                     EmployeeFirstName);
		}
	}
}